<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!--INSERT INTO wl_cust_code values(1,0,'a',null,'A','remark',0);//src="../dojo/dojo-release-1.0.0/dojo/dojo.js" 
INSERT INTO Wl_customer  values(0,'本公司','0',null,null,null,null,null,'0','0','0','0','0','0','0',null,'0','0',0,'0',null,'0','0','1','1');-->
<title>SplitContainer Demo</title>
     <style type="text/css">
            @import "../dojo/dojo-release-1.0.0/dijit/themes/tundra/tundra.css";
            @import "../dojo/dojo-release-1.0.0/dojo/resources/dojo.css";
            @import "../dojo/dojo-release-1.0.0/dojox/grid/_grid/tundraGrid.css";
            @import "../dojo/dojo-release-1.0.0/dojox/grid/_grid/Grid.css";
            @import "../js/wlProject.css";
	
      </style>
      <script type="text/javascript" src="../dojo/dojo-release-1.0.0/dojo/dojo.js"  
                djConfig="parseOnLoad: true, isDebug: true,locale: 'zh-cn', extraLocale: ['zh-TW', 'fr']"></script>
      <script>
    
            dojo.require("dojo.data.ItemFileWriteStore");
            dojo.require("dijit.layout.SplitContainer");
            dojo.require("dijit.layout.ContentPane");
            dojo.require("dijit.Tree");
            dojo.require("dojo.parser");
            dojo.require("dijit._tree.dndSource");
            dojo.require("dijit.layout.TabContainer");
            dojo.require("dijit.form.Button");
            dojo.require("dojox.grid.Grid");
            dojo.require("dojox.grid._data.model");
            dojo.require("dojo.i18n");
            dojo.require("dojox.validate._base");
            dojo.require("dijit.form.ValidationTextBox");
            dojo.require("dijit.form.TextBox");
            dojo.require("dijit.form.FilteringSelect");
            dojo.require("dojox.grid._data.dijitEditors");
            
            dojo.registerModulePath("mydojo", "../../../js/mydojo");
            dojo.require("mydojo.FilteringSelect");
            dojo.require("mydojo.ValidationTextBox");
            
     </script>
        
     <script type="text/javascript" src="../js/soapclient.js"></script>
     <script type="text/javascript" src="../js/wlProject.js"></script>
      <script type="text/javascript" src="../js/peoplevo.js"></script>
      <script type="text/javascript" src="../js/orgavo.js"></script>
      <script type="text/javascript" src="../js/orgaPeoplevo.js"></script>
     <script type="text/javascript" >


         var url = getUrl()+ "services/OrgaPeopleManageService";
         var data =new Array();
         var poptarts ={ label:'name',identifier:'eId',items:data};
         var popStore = new dojo.data.ItemFileWriteStore({data: poptarts});
         var orderBy='0';
         var deletedata2 =new Array();
          //var itemt="区域";
         var selectNodeIdentity=0;//单击的树节点ID
         var selectNode;
          
          var griddata =  new Array();
          var deletedata=new Array();
          var querydata =  new Array();
          var queryvo=new PeopleVO(); //   
          var totalCount=0 ;
          var totalpage=0 ;
          var pagenumber=1;
          var pagesize=4;
          var model = new dojox.grid.data.Table(null, griddata);
          var editfield =[{type: 'dojox.GridRowView', width: '20px' },{
          
                 //?ù??field???????????????????ò????js????toArray×???·?·¨·?????querydate????????
                       
                                 cells: [ [
                                            //{name: '????', width: 3, get:getChoise},
                                           { name: 'choise', width: 3,field:0, styles: 'text-align: center;', editor: dojox.grid.editors.Bool },//
                                           { name: 'No.', width: 2, styles: 'text-align: center;', get: function(inRowIndex){ return inRowIndex+1;} },//
                                          {name: 'peopleName', field: 2,width: 10 , editor: mydojo.ValidationTextBox ,required:true ,maxLength:30,invalidMessage:'can not be empty'}
                                             ,   {name: 'peoplePassword', field: 3,width: 10 , editor: mydojo.ValidationTextBox ,required:true ,maxLength:30,invalidMessage:'can not be empty'}
                                             ,   {name: 'remark', field: 4,width: 10, editor: mydojo.ValidationTextBox , required:false ,maxLength:100,invalidMessage:'' }
                                             ,   {name: 'peopleStatus', field: 5,width: 10 , editor: mydojo.ValidationTextBox ,required:true ,maxLength:30,invalidMessage:'can not be empty'}
                                         ,   {name: 'birthDay',field:6, width: 8,editor: dojox.grid.editors.DateTextBox,  formatter: formatDate,  constraint: { selector: "date",datePattern: "yyyy-MM-dd"}}
                                     ,   {name: 'birthDayTime',field:7, width: 8,editor: dojox.grid.editors.TimeTextBox, formatter: formatDate, constraint: {selector: "time" ,timePattern: "HH:mm"}}
                                         ,   {name: 'sex', field: 8,width: 10 , editor: mydojo.ValidationTextBox ,required:true ,maxLength:30,invalidMessage:'can not be empty'}
                                             ,   {name: 'birthPlace', field: 9,width: 10, editor: mydojo.ValidationTextBox , required:false ,maxLength:100,invalidMessage:'' }
                                             ,   {name: 'address', field: 10,width: 10, editor: mydojo.ValidationTextBox , required:false ,maxLength:100,invalidMessage:'' }
                                             ,   {name: 'tel', field: 11,width: 10, editor: mydojo.ValidationTextBox , required:false ,maxLength:100,invalidMessage:'' }
                                             ,   {name: 'engageMode', field: 12,width: 10, editor: mydojo.ValidationTextBox , required:false ,maxLength:100,invalidMessage:'' }
                                         ,   {name: 'engageDate',field:13, width: 8,editor: dojox.grid.editors.DateTextBox,  formatter: formatDate,  constraint: { selector: "date",datePattern: "yyyy-MM-dd"}}
                                     ,   {name: 'engageDateTime',field:14, width: 8,editor: dojox.grid.editors.TimeTextBox, formatter: formatDate, constraint: {selector: "time" ,timePattern: "HH:mm"}}
                                         ,   {name: 'grade', field: 15,width: 10, editor: mydojo.ValidationTextBox , required:false ,maxLength:100,invalidMessage:'' }
                                             ] ]
                           }];

function call_funUpd() {
       //var s = grid.selection.getSelected();
       var  d=new DateTimeQuery();
       var n=new NumberQuery();
       var sall=grid.model.data;
       for(var i=0;i<sall.length;i++){
       if(sall[i][0]==true){
         var passAll=0;
         var thisCell=sall[i];
         var padd = new SOAPClientParameters2();
         var vobject=new PeopleVO();
         vobject.id=thisCell[1];
              if(dojox.validate.isText(thisCell[2], {minlength: 1})){vobject.peopleName=thisCell[2];
             }else{grid.getCell(2).getNode(i).innerHTML="<span style={color:red;line-height:16px}>can not be null</span>"; passAll=1;}//not null
               if(dojox.validate.isText(thisCell[3], {minlength: 1})){vobject.peoplePassword=thisCell[3];
             }else{grid.getCell(3).getNode(i).innerHTML="<span style={color:red;line-height:16px}>can not be null</span>"; passAll=1;}//not null
                vobject.remark=thisCell[4];
               if(dojox.validate.isText(thisCell[5], {minlength: 1})){vobject.peopleStatus=thisCell[5];
             }else{grid.getCell(5).getNode(i).innerHTML="<span style={color:red;line-height:16px}>can not be null</span>"; passAll=1;}//not null
              if(thisCell[6] instanceof Date){d.upDate=dojo.date.locale.format(thisCell[6], grid.getCell(6).constraint);
             }else{grid.getCell(6).getNode(i).innerHTML="<span style={color:red;line-height:16px}>must be date</span>"; passAll=1;}//not null
              if(thisCell[7] instanceof Date){
             d.upDate=d.upDate+" "+dojo.date.locale.format(thisCell[7], grid.getCell(7).constraint);
             vobject.birthDay=d;
             }else{grid.getCell(7).getNode(i).innerHTML="<span style={color:red;line-height:16px}>must be time</span>"; passAll=1;}//not null
             
              if(dojox.validate.isText(thisCell[8], {minlength: 1})){vobject.sex=thisCell[8];
             }else{grid.getCell(8).getNode(i).innerHTML="<span style={color:red;line-height:16px}>can not be null</span>"; passAll=1;}//not null
                vobject.birthPlace=thisCell[9];
                vobject.address=thisCell[10];
                vobject.tel=thisCell[11];
                vobject.engageMode=thisCell[12];
              if(thisCell[13] instanceof Date){d.upDate=dojo.date.locale.format(thisCell[13], grid.getCell(13).constraint);
             }else{grid.getCell(13).getNode(i).innerHTML="<span style={color:red;line-height:16px}>must be date</span>"; passAll=1;}//not null
              if(thisCell[14] instanceof Date){
             d.upDate=d.upDate+" "+dojo.date.locale.format(thisCell[14], grid.getCell(14).constraint);
             vobject.engageDate=d;
             }else{grid.getCell(14).getNode(i).innerHTML="<span style={color:red;line-height:16px}>must be time</span>"; passAll=1;}//not null
             
               vobject.grade=thisCell[15];
        if(passAll==0){
             if(thisCell[1]==0){//create new row
                padd.add('peopleVO',vobject);
                padd.add('orgaId',selectNodeIdentity);
                SOAPClient.invoke(url, "createPeopleAndOrgapeo", padd, false,  function GetEnu_callBack(ul, soapResponse){
                grid.model.setDatum(ul,i,1);
                });
	         }else{//modify row
                padd.add('PeopleVO',vobject);
                SOAPClient.invoke(url, "updatePeople", padd, false,  function GetEnu_callBack(ul, soapResponse){
                });
	         }
        } }}//for
//submit delete
          for(var i=0;i<deletedata.length;i++){
               var pdel = new SOAPClientParameters();      
               pdel.add('id',deletedata[i]);
               SOAPClient.invoke(url, "deletePeople", pdel, false,  function GetEnu_callBack(ul, soapResponse){
	             
	           });
          }
          deletedata=new Array();
          dojo.byId("rowCount").innerHTML = 'saved'; 
//submit delete end          
 }

 function removeSelectedRowsGrid(){
       //var s = grid.selection.getSelected();
       var s= new Array();
       var sall=grid.model.data;
       for(var i=0;i<sall.length;i++){
       if(sall[i][0]==true){
          s.push(i);
          var thisCell=sall[i];
          if(thisCell[1]!=0){//the row which will be deleted
            deletedata.splice(deletedata.length,0,thisCell[1]);
          }
      }    
      grid.model.remove(s);//grid.removeSelectedRows();
 }}
        
addRow = function(){
          	grid.addRow([false,0,"","",""],grid.model.getRowCount());
	        } 
   



      var querylayout =[{type: 'dojox.GridRowView', width: '20px' },{
                  //??querySubdata??????     
             cells: [
                      [
                       //{name: '????', width: 3, get:getChoise},
                       { name: 'choise', width: 3, styles: 'text-align: center;', editor: dojox.grid.editors.Bool },//
                       { name: 'No.', width: 2, styles: 'text-align: center;', get: function(inRowIndex){ return inRowIndex+1;} },//
                       {name: 'peopleName', width: 10, get: function(inRowIndex){ return querySubdata[2];} }
                     ,   {name: 'peoplePassword', width: 10, get: function(inRowIndex){ return querySubdata[3];} }
                     ,   {name: 'remark', width: 10, get: function(inRowIndex){ return querySubdata[4];} }
                     ,   {name: 'peopleStatus', width: 10, get: function(inRowIndex){ return querySubdata[5];} }
                     ,   {name: 'birthDay', width: 10, get: function(inRowIndex){ return querySubdata[6];} }
                     ,   {name: 'sex', width: 10, get: function(inRowIndex){ return querySubdata[7];} }
                     ,   {name: 'birthPlace', width: 10, get: function(inRowIndex){ return querySubdata[8];} }
                     ,   {name: 'address', width: 10, get: function(inRowIndex){ return querySubdata[9];} }
                     ,   {name: 'tel', width: 10, get: function(inRowIndex){ return querySubdata[10];} }
                     ,   {name: 'engageMode', width: 10, get: function(inRowIndex){ return querySubdata[11];} }
                     ,   {name: 'engageDate', width: 10, get: function(inRowIndex){ return querySubdata[12];} }
                     ,   {name: 'grade', width: 10, get: function(inRowIndex){ return querySubdata[13];} }
                      ] ] }];
                          
//query

   
function querybutton(){
              //var p = new SOAPClientParameters2();
              var d,n;
              var validstate=0;
              //queryvo.id=0 ;
              queryvo=new PeopleVO();
              if(querypeopleName.getDisplayedValue()!="")queryvo.peopleName=querypeopleName.getDisplayedValue();//
              if(querypeoplePassword.getDisplayedValue()!="")queryvo.peoplePassword=querypeoplePassword.getDisplayedValue();//
              if(queryremark.getDisplayedValue()!="")queryvo.remark=queryremark.getDisplayedValue();//
              if(querypeopleStatus.getDisplayedValue()!="")queryvo.peopleStatus=querypeopleStatus.getDisplayedValue();//
              d=queryDate_fun("birthDay");
              if(d==null){validstate=1;}else if(d.upSign!="%"){queryvo.birthDay=d;}
              if(querysex.getDisplayedValue()!="")queryvo.sex=querysex.getDisplayedValue();//
              if(querybirthPlace.getDisplayedValue()!="")queryvo.birthPlace=querybirthPlace.getDisplayedValue();//
              if(queryaddress.getDisplayedValue()!="")queryvo.address=queryaddress.getDisplayedValue();//
              if(querytel.getDisplayedValue()!="")queryvo.tel=querytel.getDisplayedValue();//
              if(queryengageMode.getDisplayedValue()!="")queryvo.engageMode=queryengageMode.getDisplayedValue();//
              d=queryDate_fun("engageDate");
              if(d==null){validstate=1;}else if(d.upSign!="%"){queryvo.engageDate=d;}
              if(querygrade.getDisplayedValue()!="")queryvo.grade=querygrade.getDisplayedValue();//
        if(validstate==0){
              pagenumber=1;
              getVO(queryvo,pagenumber,pagesize,'0');
              if(totalpage>1){dijit.byId("but7").setDisabled(false);}else{dijit.byId("but7").setDisabled(true);}
             }      
       }

 querydis = function(){
               querydisplay("queryDiv");
            }
 
 


function getVO(queryvo,pagenumber,pagesize,orderBy){

      var pu = new SOAPClientParameters2();
      pu.add('PeopleVO',queryvo) ;
      pu.add('pageNumber',pagenumber) ;
	    pu.add('pageSize',pagesize) ;
	    pu.add('orderBy',orderBy) ;
      SOAPClient.invoke(url,"getPeople", pu, false,  function GetEnu_callBack(ul, soapResponse){      
           querydata=PeopleVOtoArray_fun(ul,true);
           totalCount=ul[ul.length-1]["ns:id"]; 
           totalpage=Math.ceil(new Number(totalCount)/pagesize);
           document.getElementById("rowCount").innerHTML=" "+pagenumber+" / "+totalpage+" / "+totalCount+" " ;
      }); 
      querydata.splice(querydata.length-1,1);
      model.setData(querydata);
      //dijit.byId("grid").updateRowCount(querydata.length); 
 }              
          
          
        
        
  var myModel = new dijit.tree.ForestStoreModel({
  				store: popStore,
  				rootId: "0",
  				rootLabel: "部门",
  				childrenAttrs: ["children"]
  			});        
  var _tree=dijit.byId("tree");      
  function getTreeNodes(orgaSno,chitem,layerInt,layerSum){//首层layerInt=0
             var pl = new SOAPClientParameters();
           pl.add('orgaSno',orgaSno) ;
           pl.add('orgaName','%') ;
           pl.add('orgaCode','%') ;
           pl.add('remark','%') ;
           pl.add('orgaState','%') ;
           pl.add('id',0) ;
           SOAPClient.invoke(url, "getOrgaInfoVO", pl, false,  function GetEnu_callBack(ul, soapResponse){
               var pInfo = {
                   					parent: chitem,		
                   					attribute: "children"	
                   		};
               if(ul!=null && ul.length>0 ){
                     
                     for(var i = 0; i < ul.length; i++){		
                                  var ulo=ul[i];
                                  var newitem=popStore.newItem({name: ulo["ns:orgaName"],type:ulo["ns:orgaSno"] ,eId:ulo["ns:id"]}, pInfo);//haveChild=0初始，1有子结点，2无子结点
                                  if(layerInt<layerSum)getTreeNodes(ulo["ns:orgaSno"]+"___",newitem,layerInt+1,layerSum);
                                  
                             }
                      if(chitem!=null){
                            popStore.setValue(chitem,"haveChild","1"); 
                            var node = dijit.byId("tree")._itemNodeMap[chitem.eId];
                            node._updateItemClasses(node.item);
                            //node.expand();       
                      }
                             
                }else{
                    popStore.setValue(chitem,"haveChild","2");  
                }       
          });
        
        }
   function expandAllChildrenNode(tree,treeNode,layerInt,layerSum){
		       var childrenArray=treeNode.getChildren();
          if(childrenArray!=null&&childrenArray.length>0)tree._expandNode(treeNode);
         
          
          for (var i=0; i<childrenArray.length; i++){	
             if(layerInt<layerSum) expandAllChildrenNode(tree,childrenArray[i],layerInt+1,layerSum);
             if(layerInt==layerSum)childrenArray[i]._updateItemClasses(childrenArray[i].item);
          }
        }              
        
   function getOrgaPeopleVO(queryvo,pagenumber,pagesize,orderBy){

      var pu = new SOAPClientParameters2();
      pu.add('OrgaPeopleVO',queryvo) ;
      pu.add('pageNumber',pagenumber) ;
	    pu.add('pageSize',pagesize) ;
	    pu.add('orderBy',orderBy) ;
      SOAPClient.invoke(url,"getOrgaPeople", pu, false,  function GetEnu_callBack(ul, soapResponse){      
           querydata=OrgaPeopleVOtoArray_fun(ul,false);
           totalCount=ul[ul.length-1]["ns:id"]; 
           totalpage=Math.ceil(new Number(totalCount)/pagesize);
           document.getElementById("rowCount").innerHTML=" "+pagenumber+" / "+totalpage+" / "+totalCount+" " ;
      }); 
      //querydata.splice(querydata.length-1,1);
      var peoplequerydate =new Array();
      for(var i=0;i<querydata.length-1;i++){
        peoplequerydate[i]=PeopleVOtoArray_fun(querydata[i][2],true);
      }
      alert(peoplequerydate);
      model.setData(peoplequerydate);
      //dijit.byId("grid").updateRowCount(querydata.length); 
 }
   
   function init(){
        //添加分类第一层结点        
		    var _tree=dijit.byId("tree");  
		    getTreeNodes("___",null,0,2);//001,002,003...
		    expandAllChildrenNode(_tree,_tree.rootNode,0,1);

    dojo.connect(dijit.byId("tree"), "_onExpandoClick", function(message){
                       var node = message.node;
                       var ch2node=node.getChildren();
                       for (var i=0; i<ch2node.length; i++){	
                       if(ch2node[i].getChildren().length==0&&ch2node[i].item.haveChild=="0"){
                         var ch2item =ch2node[i].item;
                         getTreeNodes(ch2item.type+"___",ch2item,0,1);
                       }
                      
                      }
             	 
            });   
//查询列表----begin
             dojo.connect(_tree, "onClick", function(item,node){
             //判断哪个tab在显示
             	      selectNode=node;
                    selectNodeIdentity = _tree.store.getIdentity(item);
                    var p0 = new SOAPClientParameters();
              if(mainTabContainer.selectedChildWidget.id=='peoplePane'){
                    var OrgaPeoplequeryvo=new OrgaPeopleVOJs();
                    var orgaquervo= new OrgaInfoVOJs();
                    orgaquervo.id=item["eId"];
                    OrgaPeoplequeryvo.orga=orgaquervo;
                    getOrgaPeopleVO(OrgaPeoplequeryvo,pagenumber,pagesize,orderBy)
                    
                grid.selection.clear();
                /* var titles=node.item["name"];
                var parentNodes=node;
                while(parentNodes.getParent()!= null&& parentNodes.getParent()["id"]!="tree"){
                      parentNodes=parentNodes.getParent();
                      titles=parentNodes.item["name"]+' '+titles;
                };
                dojo.byId("placetitle").innerHTML = titles +"";*/
                deletedata =new Array();
              }
          });  
           //查询列表----end
  }//END INIT
            
           dojo.addOnLoad(init);
           

          //查询按钮
          
          

             
</script>
</head>
<body class="tundra">
       
	
	 <div dojoType="dijit.layout.SplitContainer"   orientation="horizontal"  sizerWidth="7" activeSizing="false"	style="border: 1px solid #bfbfbf; width: 1260px; height: 845px;"  >
		
         <div dojoType="dijit.layout.ContentPane" id="treePane"  sizeMin="20" sizeShare="20"   >
                     
                <div id="tree" showRoot="true" persist="false" dojoType="dijit.Tree"  store="popStore" labelAttr="name"  childrenAttr="children"  model="myModel" ></div> 
         </div>
         
        <div dojoType="dijit.layout.ContentPane" sizeMin="50" sizeShare="50"  >
        
        	<div jsId="mainTabContainer" dojoType="dijit.layout.TabContainer"  styles="width: 70%; height: 100%;"  >
        	
        	<div id="peoplePane" dojoType="dijit.layout.ContentPane" title="人员" selected="true" >
	           		<div id="queryDiv" style="margin-right: 30px;  height: 460px; display:none;" >
              <table align="center" width=100% class="queryTable"  >
                <tr ><td align="center" style="{width:11%}">Please input criterial:</td>
                <td style="{width:22%}" ></td>
                <td style="{width:11%}"></td>
                <td style="{width:6%}" ></td>
                <td style="{width:11%}" ></td>
                <td style="{width:6%}" ></td>
                <td style="{width:11%}"></td>
                <td style="{width:22%}"></td></tr> 
                <tr ><td align="center" style="{width:11%}"></td>
                <td style="{width:22%}" ></td>
                <td style="{width:11%}"></td>
                <td style="{width:6%}" ></td>
                <td style="{width:11%}" ></td>
                <td style="{width:6%}" ></td>
                <td style="{width:11%}"></td>
                <td style="{width:22%}"></td></tr>  
                <tr>
                    <td align="right"  >peopleName:</td>
                    <td align="left"  ><input type="text" class="editerInput"  id="querypeopleName"  jsId="querypeopleName"   dojoType="dijit.form.TextBox"  /></td>
                    <td align="right"  >peoplePassword:</td>
                    <td align="left"  colspan="3" ><input type="text" class="editerInput"  id="querypeoplePassword"  jsId="querypeoplePassword"   dojoType="dijit.form.TextBox"  /></td>  
                    <td align="right"  >remark:</td>
                    <td align="left"  ><input type="text" class="editerInput"  id="queryremark"  jsId="queryremark"   dojoType="dijit.form.TextBox"  /></td>  
              </tr>
                <tr>
                    <td align="right"  >peopleStatus:</td>
                    <td align="left"  ><input type="text" class="editerInput"  id="querypeopleStatus"  jsId="querypeopleStatus"   dojoType="dijit.form.TextBox"  /></td>
                    <td align="right"  >birthDay:</td>
                    <td align="left"   colspan="5"><span id="querybirthDayImg0"  ><input class="editerDate"   jsId="querybirthDay" id="querybirthDay"  constraints="{datePattern:'yyyy-MM-dd'}" dojoType="dijit.form.DateTextBox"  />
                        <input class="editerTime" jsId="querybirthDayTime" id="querybirthDayTime" value="00:00" dojoType="dijit.form.TimeTextBox" constraints="{timePattern:'HH:mm'}"   invalidMessage="Invalid time. Use HH:mm where HH is 00 - 23 hours."></span>
                        <span id="querybirthDayImg1" style="{display:none}" ><input class="editerDateSmall"   jsId="query1birthDay" id="query1birthDay"  constraints="{datePattern:'yyyy-MM-dd'}" dojoType="dijit.form.DateTextBox"  />
                        <input class="editerTimeSmall" jsId="query1birthDayTime" id="query1birthDayTime" value="00:00" dojoType="dijit.form.TimeTextBox" constraints="{timePattern:'HH:mm'}"   invalidMessage="Invalid time. Use HH:mm where HH is 00 - 23 hours."></span>
                        <span hidefocus="true" style="{display:none}" onclick="selectSign(this);" id="querybirthDayImgup">></span>
                        <img src="../image/start.gif" onclick="queryType(this);" id="querybirthDayImg" height="15" width="20" border="0">
                        <span hidefocus="false"  style="{display:none}" onclick="selectSign(this);" id="querybirthDayImgdown" >></span>
                        <span id="querybirthDayImg2div" style="{display:none}"><input class="editerDateSmall"   jsId="query2birthDay" id="query2birthDay"  constraints="{datePattern:'yyyy-MM-dd'}" dojoType="dijit.form.DateTextBox"  />
                        <input class="editerTimeSmall" jsId="query2birthDayTime" id="query2birthDayTime" value="00:00" dojoType="dijit.form.TimeTextBox" constraints="{timePattern:'HH:mm'}"   invalidMessage="Invalid time. Use HH:mm where HH is 00 - 23 hours."></span>
                    </td>
                <tr>
                    <td align="right"  >sex:</td>
                    <td align="left"  ><input type="text" class="editerInput"  id="querysex"  jsId="querysex"   dojoType="dijit.form.TextBox"  /></td>
                    <td align="right"  >birthPlace:</td>
                    <td align="left"  colspan="3" ><input type="text" class="editerInput"  id="querybirthPlace"  jsId="querybirthPlace"   dojoType="dijit.form.TextBox"  /></td>  
                    <td align="right"  >address:</td>
                    <td align="left"  ><input type="text" class="editerInput"  id="queryaddress"  jsId="queryaddress"   dojoType="dijit.form.TextBox"  /></td>  
              </tr>
                <tr>
                    <td align="right"  >tel:</td>
                    <td align="left"  ><input type="text" class="editerInput"  id="querytel"  jsId="querytel"   dojoType="dijit.form.TextBox"  /></td>
                    <td align="right"  >engageMode:</td>
                    <td align="left"  colspan="3" ><input type="text" class="editerInput"  id="queryengageMode"  jsId="queryengageMode"   dojoType="dijit.form.TextBox"  /></td>  
                    <td align="right"  > </td>
                    <td align="right"  ></td>
                </tr><tr >
                    <td align="right"  >engageDate:</td>
                    <td align="left"  colspan="3"><span id="queryengageDateImg0"  ><input class="editerDate"   jsId="queryengageDate" id="queryengageDate"  constraints="{datePattern:'yyyy-MM-dd'}" dojoType="dijit.form.DateTextBox"  />
                        <input class="editerTime" jsId="queryengageDateTime" id="queryengageDateTime" value="00:00" dojoType="dijit.form.TimeTextBox" constraints="{timePattern:'HH:mm'}"   invalidMessage="Invalid time. Use HH:mm where HH is 00 - 23 hours."></span>
                        <span id="queryengageDateImg1" style="{display:none}" ><input class="editerDateSmaller"   jsId="query1engageDate" id="query1engageDate"  constraints="{datePattern:'yyyy-MM-dd'}" dojoType="dijit.form.DateTextBox"  />
                        <input class="editerTimeSmaller" jsId="query1engageDateTime" id="query1engageDateTime" value="00:00" dojoType="dijit.form.TimeTextBox" constraints="{timePattern:'HH:mm'}"   invalidMessage="Invalid time. Use HH:mm where HH is 00 - 23 hours."></span>
                        <span hidefocus="true" style="{display:none}" onclick="selectSign(this);" id="queryengageDateImgup">></span>
                        <img src="../image/start.gif" onclick="queryType(this);" id="queryengageDateImg" height="15" width="20" border="0">
                        <span hidefocus="false"  style="{display:none}" onclick="selectSign(this);" id="queryengageDateImgdown" >></span>
                        <span id="queryengageDateImg2div" style="{display:none}"><input class="editerDateSmaller"   jsId="query2engageDate" id="query2engageDate"  constraints="{datePattern:'yyyy-MM-dd'}" dojoType="dijit.form.DateTextBox"  />
                        <input class="editerTimeSmaller" jsId="query2engageDateTime" id="query2engageDateTime" value="00:00" dojoType="dijit.form.TimeTextBox" constraints="{timePattern:'HH:mm'}"   invalidMessage="Invalid time. Use HH:mm where HH is 00 - 23 hours."></span>
                    </td>
                    <td align="right" colspan="2" ></td>
                    <td align="right"  >grade:</td>
                    <td align="left"  ><input type="text" class="editerInput"  id="querygrade"  jsId="querygrade"   dojoType="dijit.form.TextBox"  /></td>  
	
          <tr align="center"><td></td>
           <td colspan="2"><a onclick="querybutton();"><img src="../image/332.gif" height="20" width="20" border="0">OK</a></td>
           <td colspan="3"></td><td colspan="2"></td></tr>
         </table>
	     </div>
	     <div align="right">
	          	 &nbsp;&nbsp;&nbsp;
	          	     <button dojoType="dijit.form.Button" onclick="addRow();" iconClass="addIcon" >add</button>
	                 <button dojoType="dijit.form.Button" onclick="removeSelectedRowsGrid();" iconClass="delIcon" >delete</button>
	                 <button dojoType="dijit.form.Button" id="but3" jsId="but3" onclick="call_funUpd();"  iconClass="saveIcon">save</button>
	          	     <button dojoType="dijit.form.Button" onclick="querydis();" iconClass="queryIcon" >query</button>
                  
         		</div>    
	        
	      
	         <div id="rowCount"></div>
	    <div style="{height:90%;width:100%}"  >
	         <div id="grid"  dojoType="dojox.Grid" autoWidth="false"  jsId="grid"	model="model"  structure="editfield" singleClickEdit="true" ></div>
      </div> 
      <div align="right" ><span id="rowCount"></span>
        <button dojoType="dijit.form.myButton" onclick="upPage();"  id="but6" disabled='true' jsId="but6" iconClass="upPageIcon" >pageup</button><!--span dojoType="dijit.Tooltip" connectId="but6">pageup</span-->
        <button dojoType="dijit.form.myButton" onclick="downPage();" id="but7" disabled='true' jsId="but7" iconClass="downPageIcon" >pagedown</button><!--span dojoType="dijit.Tooltip" connectId="but7">pagedown</span-->
        <div id="668" dojoType="dijit.form.myDropDownButton" iconClass="pageIcon" ><span>pageNumber</span>
  			  <div dojoType="dijit.Menu">
				  <div dojoType="dijit.MenuItem" label="10"  iconClass="toPageIcon"		onClick="pageSizeChange(this.label);"></div>
				  <div dojoType="dijit.MenuItem"  label="30" iconClass="toPageIcon"		onClick="pageSizeChange(this.label);"></div>
		      <div dojoType="dijit.MenuItem"  label="50" iconClass="toPageIcon"		onClick="pageSizeChange(this.label);"></div>
					<div dojoType="dijit.MenuItem"  label="100" iconClass="toPageIcon"	onClick="pageSizeChange(this.label);"></div>
					<div dojoType="dijit.MenuItem"  label="noPage" iconClass="noPageIcon"	onClick="allpage();"></div>
		      </div><!--span dojoType="dijit.Tooltip" connectId="668"></span-->
        </div>
		    <div id="669" dojoType="dijit.form.myDropDownButton" iconClass="pageStyleIcon"><span>pageStyle</span>
  			   <div dojoType="dijit.Menu">
  				 <div dojoType="dijit.MenuItem"  iconClass="rowIcon"		label="row"	onClick="pageStyle(this.label);"></div>
  				 <div dojoType="dijit.MenuItem"  iconClass="colIcon"		label="col"	onClick="pageStyle(this.label);"></div>
		    </div></div>
     </div>    
	      </div>

          <div id="productPane" dojoType="dijit.layout.ContentPane" title="人员-->角色"   >
	           	
       </div>  
 </div>
</body></html>
